The Let's Play Archive

SHENZHEN I/O

by Quackles

Part 37: Assignment #16: Can You Keep a Secret?? Haunted Doll Project

Can You Keep a Secret?? Haunted Doll Project





You know how on Looney Toons, when a cartoon character blinks? And they have the tinkling of a xylophone to go along with it?

That's about how I feel right now. After a while, you just sort of get... desensitized to bad ideas. You say to yourself, 'this is a bad idea', but... it is your job. All you can really do is be there to say "I told you so".
Mind you, I'm looking forward to saying "I told you so" for THIS.







I tried to read the writing on that smeared chip, but without any success - so I'll have to settle for thinking of it as a random number generator. No obvious pattern to its output... I wonder what it was originally for?

The first thing that feels obvious about this design is that I'm going to need to store the audio data for the two sound effects that Carl found - and that means, memory chips.

[ ~ ]



   

Did Carl fire up his copy of Internet Explorer 3.0 to get at the page with those sound effects, I wonder? Each effect snippet is conveniently 13 samples long, perfect for fitting in a 200P-14 memory chip. I can't speculate as to the actual sound quality, though.

Anyway, the memory chips are in, as is a MC6000 and the first half of the code - this half waits for the RNG to return a 1 (or 2) and moves it to acc if so. If it's not either, it sleeps until the next time unit. The only remaining part is actually playing the audio.

[ ~ ~ ]



   



Ta-da! One haunted audio-playing code part, as requested! The 'play' code loops to play the audio - it reads the audio sample from the correct chip (based on the value we put in acc earlier), pushes it out to the speaker, then waits for the next time unit. The memory chips' auto-increment is really useful here - once I read a sound sample, the memory chip will immediately provide the next one when I read again.

There's a few tricks I use to get the 'play' part to work right - first off, none of the effects have the sample '50' (audio silence) in them, and the memory chips each had a free slot at the end. So, I put a 50 in that slot. When the MC reads the 50, it knows it's read the entire sound effect and that it can go back to waiting (it doesn't jmp back to the label play:, so the code path falls through to the top).

The only other thing of note besides the audio-playing code is the @ mov 50 p1 at the front of the MC's script, which initializes the speaker when the device is turned on.

For all that this feels like a vaguely terrible thing to do to someone, I can't help wondering where this is going to end up. Could it show up on whatever the Chinese equivalent to Twitch is? That'd be interesting...!



Told you so.

I wonder if David is free this evening to indulge in some "traditional Chinese cocktails"?


PS: I looked up "ghost shifts". It took me a while to find a definition... apparently it refers to, at least traditionally, where a factory making something will make the thing on two shifts, then make more-or-less identical counterfeit versions (well, technically counterfeit) for outside sale during the 'ghost shift'.
Does our factory have ghost shifts that work like that?!


PPS: Speaking of ghosts and supernatural monsters and so on, there is one bright spot in the stuff I've been doing lately. I’ve been getting into some of the local TV shows (thanks to the big networks helpfully providing English subtitles).
There’s one - it’s called My Roommate Is A Lamia! - that’s pretty good! The special effects are pretty amazing just by themselves, and the plot is… well, it’s pretty fun. Wacky, but fun. The main guy has just figured out that his roommate is... well, you know... and I'll keep y'all posted how it goes from there.